package decorate.fromKanYun;

public class DecoratorForFilter1 implements Filterable {

    private Filterable filterable;

    public DecoratorForFilter1(Filterable filterable) {
        this.filterable = filterable;
    }

    @Override
    public void filter(){
        beforeMethod();
        filterable.filter();
        afterMethod();
    }

    public void beforeMethod(){
        System.out.println("DecoratorForFilter1 --> 核心过滤方法执行前执行");
    }

    public void afterMethod(){
        System.out.println("DecoratorForFilter1 --> 核心过滤方法执行后执行");
    }
}
